{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "25cba1ba",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8370c719",
   "metadata": {},
   "source": [
    "**Import Data**\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b5c511f4",
   "metadata": {},
   "outputs": [],
   "source": [
    "data=pd.read_csv(\"Original Data/TwoPerson.csv\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "33c158c8",
   "metadata": {},
   "source": [
    "**Output**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6033e5e8",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(data[(data.Treatment==1)].Decision.mean()*20,data[(data.Treatment==2)].Decision.mean()*20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e53f7128",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Leader in No Feedback where MyCurrentBest<=15\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest<=15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest<=15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest<=15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4c892fa6",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Leader in No Feedback where MyCurrentBest Above 15\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest>15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest>15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest>15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c4bb494e",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Follower in No Feedback where MyCurrentBest<=15 \n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest<=15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest<=15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest<=15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c3b93989",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Follower in No Feedback where MyCurrentBest above 15\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest>15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest>15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==1)&(data.MyCurrentBest>15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "759797c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Leader in Feedback where CurrentBest<=15\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest<=15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest<=15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest<=15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "177e8c46",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Leader in Feedback where CurrentBest above 15\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest>15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest>15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest>15)&(data.MyCurrentBest==data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "daedaa2f",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Follower in Feedback where CurrentBest<=15\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest<=15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest<=15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest<=15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dcb7823e",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Follower in Feedback where CurrentBest above 15\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest>15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==2)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest>15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==6)].Decision.mean())\n",
    "print(data[(data.Treatment==2)&(data.CurrentBest>15)&(data.MyCurrentBest<data.CurrentBest)&(data.DecisionNumber%10==0)].Decision.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bd382065",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9aabfe42",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
